//
//  AppDelegate.swift
//  CarShare
//
//  Created by Pro on 2017/12/12.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.backgroundColor = UIColor.white
        
        AppConfig().setAppConfig()
        setupSDK(application: application)
        loadController()

        window?.makeKeyAndVisible()
        
        
        return true
    }

    func applicationWillResignActive(_ application: UIApplication) {}

    func applicationDidEnterBackground(_ application: UIApplication) {}

    func applicationWillEnterForeground(_ application: UIApplication) {}

    func applicationDidBecomeActive(_ application: UIApplication) {}

    func applicationWillTerminate(_ application: UIApplication) {}
    
    /** 加载控制器 */
    func loadController() {
        if true {
            let VC = BaseNavigationController(rootViewController: LoginController())
            window?.rootViewController = VC
        }
        
    }
}

